﻿----------------------------------------------------------------------------------------------------
--
--  © 2012 Stanislav S. Yarmonov.
--
--  TODO:LICENSE
--     
----------------------------------------------------------------------------------------------------
EXECUTE [_DB].[Procedure_Drop] N'[_DB].[Log_Write]'
GO

----------------------------------------------------------------------------------------------------
--
--  Log record registration routine.
--
--  INPUT
--		@@Type
--		Type of the log record.
--
--		@@Message
--		Logged message.
--
--		@@Details
--		Log record details.
--
----------------------------------------------------------------------------------------------------
CREATE PROCEDURE [_DB].[Log_Write]
	@@Type [int] = NULL,
	@@Message [nvarchar](255),
	@@Details [xml] = NULL
AS
SET NOCOUNT ON

INSERT INTO [_DB].[Log] (
	[Created],
	[Type],
	[Message],
	[Details]
) SELECT
	GETDATE(),
	@@Type,
	@@Message,
	@@Details

RETURN 0
GO

